<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head><!DOCTYPE html>
<html lang="en" class="no-ie" style="overflow:hidden;">
	<head>
		<meta charset="UTF-8">
		<title>近7天进场分析</title>
		<script>
			"object"!=typeof ue||"object"!=typeof ue.interface?("object"!=typeof ue&&(ue={}),ue.interface={},ue.interface.broadcast=function(e,t){if("string"==typeof e){var o=[e,""];void 0!==t&&(o[1]=t);var n=encodeURIComponent(JSON.stringify(o));"object"==typeof history&&"function"==typeof history.pushState?(history.pushState({},"","#"+n),history.pushState({},"","#"+encodeURIComponent("[]"))):(document.location.hash=n,document.location.hash=encodeURIComponent("[]"))}}):function(e){ue.interface={},ue.interface.broadcast=function(t,o){"string"==typeof t&&(void 0!==o?e.broadcast(t,JSON.stringify(o)):e.broadcast(t,""))}}(ue.interface),(ue4=ue.interface.broadcast);
		</script>
		<script src="./dist/echarts.min.js"></script>
		<script>
			$(function() {
				ue4("getSize",{mes:"get windows size"});
				ue4("getColor",{mes:"get all color"});
				ue4("getData",{mes:"get all data"});
				ue4("beginSize",{mes:BeginSize[0],mes2:BeginSize[1]});
				ue4("beginSizeY",{mes:BeginSize});
			});
			/*$(function () {
			    
			});*/
		</script>
		<style>
			* {
				margin: 0;
				padding: 0;
			}

		</style>
	</head>
	<body>
		<div id="main" ></div>
		<!--
		dataTemp1: y轴数值;dataTemp2: x轴标题
		-->
		<script>
			let BeginSize = [545,363];
			let myChart = null;
			let myColor = ['#F1644E','#E58C51','#FFEC8A','#63FFCA','#01ECFF','#3E98FF'];
			let datain = [8,7,5.5,5,4.9,4.5];
			let dataTitle = ['小葱','白萝卜','香菇','洋葱','葱','尖椒']

			function fresh() {
				let option = {
					backgroundColor:'rgba(13,29,70,0.75)',
					title:{
						text:'单位：元',
						textStyle:{
							fontSize:22,
							color:'#8F9DB2'
						},
						left:'3%',
						top:'0%'
					},
					grid: {
					        left: '3%',
					        right: '3%',
							top:'13%',
					        bottom: '2%',
					        containLabel: true
					},
					xAxis: [{
						data:dataTitle,
						type: 'category',
						show: false,
						axisLabel: {
							show:true,
							color: '#E4E7F2',
							fontSize: 22,
							interval: 0
						},
						splitLine: {
							show: false
						},
						axisLine: {
							show: true,
							lineStyle:{
								type:'solid',
								color:'#8F9DB2',
								width:1
							}
						},
						axisTick :{
							show:false
						},
						show:true,
						
					}],
					yAxis: [{
						type: 'value',
						splitLine: {
							show: false,
						},
						axisLine: { //y轴
							show: true,
							lineStyle:{
								type:'solid',
								color:'#8F9DB2',
								width:1
							}
						},
						axisTick: {
							show: false
						},
						axisLabel: {
							color: '#E4E7F2',
							fontSize: 22,
							interval: 1
						},
						
						axisTick: {
							show: false
						},
						// position: 'left',
					}],
					series: [{
						name: 'XXX',
						type: 'pictorialBar',
						symbol: 'image://https://s1.ax1x.com/2022/07/12/jgOE36.png',
						symbolSize: [50, 50],
						symbolOffset: [0, -20],
						symbolPosition: 'end',
						z: 12,
						data:datain
					},{
						name: '进场分析',
						type: 'bar',
						barWidth:10,
						label: {
							show: false
						}, 
						itemStyle: {
							normal: {
								barBorderRadius: 5,
								color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
									{ offset: 0, color: 'rgba(99, 231, 183, 1)' },
									{ offset: 1, color: 'rgba(191, 255, 232, 1)' }
								]),
							}
						},
						data: datain,
					}, ]
					
				};
				myChart = echarts.init(document.getElementById('main'));
				myChart.setOption(option);
			}

			fresh();

			
			//浏览器测试用
			change(BeginSize[0],BeginSize[1]);


			function change(x, y) {
				let div = document.getElementById("main");
				//alert("I am an alert box!!");
				div.style.width = x + "px";
				div.style.height = y + "px";
				var myOption = myChart.getOption();
				myChart.resize();
				let types = []
				myOption.series.forEach((item) => {
					types.push(item.type)
				})
				return types
			}
			
			
			/************下面数据***********/
			ue.interface.TransData1 = function(data) {
				dataTemp1 = data;
				fresh();
			};
			
			
		</script>
	</body>
</html>

	<body>
	</body>
</html>
